package com.sky.controller.admin;

import com.sky.dto.OrdersConfirmDTO;
import com.sky.entity.Orders;
import com.sky.result.Result;
import com.sky.service.OrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController("admin")
@RequestMapping("/admin/order")
public class OrdersController {
    @Autowired
    private OrdersService ordersService;
///admin/order/confirm
    @PutMapping("/confirm")
    public Result confirm(Integer id){
        ordersService.confirm(id);
        return Result.success();
    }
}
